angular.module('netEasy', [])
    .service('musicService', function($http) {
        return {
            search: function(s, type) {
                return $http.get('/music/search', {
                    params: {
                        's': s,
                        'type': type
                    }
                });
            },
            detail: function(song_id) {
                return $http.get('/music/detail', {
                    params: {
                        'id': song_id
                    }
                });
            },
            singer: function(singer_id) {                
                return $http.get('/music/singer', {
                    params: {
                        id: singer_id
                    }
                });
            }
        };
    });
